<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>意见回复汇总</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	</head>
	<body>
		
		意见标题：<h3>${topic.topicname }</h3>
		<br />
		<br />
		<br />
		意见回复列表：
		<table width="500">
			<tr>
				<td>内容</td><td>回复人</td><td>回复时间</td>
			</tr>
			<c:forEach var="child" items="${children}" varStatus="status">
				<tr>
					<td>${child.content}</td>
					<td>${child.writer}</td>
					<td>${child.returntime}</td>
				</tr>
			</c:forEach>
		</table>

		<br />
		<br />
		<br />
		<form onsubmit="return validateData(this);" action="topicchild.action" method="post" id="ctl00">
			意见回复:<textarea id="topicchild_content" rows="3" cols="15" name="topicchild.content">${topicchild.content }</textarea>
			<input type="hidden" name="topicchild.topicid" value="${topic.tid}" />
			<input type="hidden" name="topicchild.writer" value="${curruser.uname}" />
			<input type="submit" value="提交" />
		</form>

		<script type="text/javascript" src="../js/jquery-1.4.min.js"></script>
		<script type="text/javascript" src="../js/jquery.validate.js"></script>
		<script type="text/javascript">
		$(function(){
			
		});
		var validateData = function(form) {
			var c = $.trim($("#topicchild_content").val());
			if(c == "") {
				alert("回复不能为空");
				return false;
			} else if(c.length > 4000){
				alert("回复最长为4000字符");
				return false;
			}
			return true;
		};
		</script>
	</body>
</html>

